<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        .red{
            color: red;
        }
        .blue{
            background: blue;
        }
    </style>
    <script src="vue.js"></script>
    <script>
        window.onload=function(){
            new Vue({
                el:'#box',
                data:{
                    cred:'red',
                    bblue:'blue',
                    json:{
                        red: 'red',
                        blue: true
                    }
                }
            });
        };
    </script>
</head>
<body>
    <div id="box">
        <strong :class="[cred,bblue]">文字...</strong><br><br><br>
        <strong :class="json">文字...</strong>
    </div>
</body>
</html>



















